Skip to content
  • 0 Votes
    16 Posts
    8k Views
    R

    @kshegunov Yes yes I understand you and that was what I was trying to achieve but dunno why it didn't work fine. finally it works correctly without having to call it every time in every constructor of every wizardpage. The label that was not ok with the stylesheet had a QPalette with the colour and then some css with setStyleSheet() so seems that both are incompatibles and doing that the setStyleSheet() function was ignored. I've removed the QPalette and now it works perfect.

    Thanks for everything!

  • 0 Votes
    4 Posts
    3k Views
    VRoninV

    Stylesheets can handle everything you said but the animation.
    To implement that I'd subclass QWidget and put a QPushButton and a QLabel on top of each other (manually or put them in the same cell of a QGridLayout), assign a QMovie vith the animation to the label and connect the QPushButton::clicked signal to QLabel::show slot.
    When the work is finished just call the QLabel::hide slot

    for the loaded/non loaded icon on the button you can either call QPushButton::setIcon() with a different icon or subclass QPushButton, add a Q_PROPERTY that stores the state of the button (loaded/non loaded) and let the stylesheet take care of setting the right icon